﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrativo/MasterAdministrativo/Administrativo.Master"
    AutoEventWireup="true" CodeBehind="EnviarEvangelho.aspx.cs" Inherits="Acamps.Web.Administrativo.EnviarEvangelho" ClientIDMode="Static" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $().ready(function () {
            $("#txtData").blur(function () {
                $("#hidEvangelho").val("");
                $("#txtTitulo").val("");
                $("#txtLeitura").val("");
                $("#txtEvangelho").val("");
                $("#txtTituloComentario").val("");
                $("#txtLeituraComentario").val("");
                $("#txtComentarioEvangelho").val("");
                $.ajax({
                    type: "POST",
                    url: "EnviarEvangelho.aspx/ConsultaEvangelho",
                    data: "{data:'" + $(this).val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    async: false,
                    error: function (xhr, ajaxOptions, thrownError) {
                        //alert(xhr.status);
                    },
                    success: function (json) {
                        if (json.d != "") {
                            $("#hidEvangelho").val(json.d.split("#")[0]);
                            $("#txtTitulo").val(json.d.split("#")[1]);
                            $("#txtLeitura").val(json.d.split("#")[2]);
                            $("#txtEvangelho").val(json.d.split("#")[3]);
                            $("#txtTituloComentario").val(json.d.split("#")[4]);
                            $("#txtLeituraComentario").val(json.d.split("#")[5]);
                            $("#txtComentarioEvangelho").val(json.d.split("#")[6]);
                        }
                        $("#divEvangelhoTeste").show();
                        $("#dvBtnSalvar").show();
                        
                    }
                });

            });
        });
    </script>
    <style type="text/css">
        input[type="text"]
        {
            width: 300px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="col15" style="margin-left: 40%; height: auto!important;">
        <span>Data: </span>
        <br />
        <asp:TextBox runat="server" ID="txtData" tipo="data" />
    </div>
    <div id="divEvangelhoTeste" style="display: none;">
        <div runat="server" id="dvEvangelho" class="col15" style="margin-left: 10%">
            <div style="float: left; width: 45%; height: 100%;">
                <h4>Evangelho</h4>
                <span>Título: </span>
                <br />
                <asp:TextBox runat="server" ID="txtTitulo" /><br />
                <span>Leitura: </span>
                <br />
                <asp:TextBox runat="server" ID="txtLeitura" /><br />
                <span>Evangelho: </span>
                <br />
                <asp:TextBox runat="server" ID="txtEvangelho" TextMode="MultiLine" Rows="100" Height="350px" /><br />
            </div>
            <div style="float: left; width: 45%; height: 100%;">
                <h4>Comentário Evangelho</h4>
                <span>Título: </span>
                <br />
                <asp:TextBox runat="server" ID="txtTituloComentario" /><br />
                <span>Leitura: </span>
                <br />
                <asp:TextBox runat="server" ID="txtLeituraComentario" /><br />
                <span>Comentário: </span>
                <br />
                <asp:TextBox runat="server" ID="txtComentarioEvangelho" TextMode="MultiLine" Rows="100" Height="350px"  /><br />
            </div>
             <div style="clear: both;"></div>
        </div>
        <div style="clear: both;"></div>
    </div>

    <div class="col15" style="margin-left: 40%; margin-top: 10px; height: auto!important; display: none" id="dvBtnSalvar" >
        <asp:Button runat="server" ID="btnSalvar" Text="Salvar" CssClass="btn btn-primary" OnClick="btnSalvar_OnClick" Visible="false" />
        <asp:Button runat="server" ID="btnLimpar" Text="Limpar" CssClass="btn " OnClick="btnLimpar_OnClick" Visible="false" />
    </div>
    <asp:HiddenField runat="server" ID="hidEvangelho" />

</asp:Content>
